#include "Debug.h"
#include "Game.h"

#include "Maze.h"

#include <iostream>

using namespace std;

#ifdef WIN32
// Windows
#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance,
					HINSTANCE hPrevInstance,
					PSTR pCmdLine,
					int iCmdShow)
#else
int main()
#endif
{
#if (defined(DEBUG) || defined(_DEBUG)) && defined(WIN32)
	_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif

	GamePtr pGame = GamePtr(new CGame());

	pGame->init();
	pGame->run();

	pGame.reset();
	

#if (defined(DEBUG) || defined(_DEBUG)) && defined(WIN32)
	_CrtDumpMemoryLeaks();
#endif
	return 0;
}